angular.module('rankModule', [])
    .directive('appRank', function () {
        return {
            restrict: 'AE',
            replace: true,
            scope: {
                item: '=attrData', //&传递函数， @传递字符串，=传递变量
            },
            templateUrl: 'src/view/template/app-rank.html',
            link: function (scope, ele, attr) {
                scope.linkFn = function () {
                    console.log('hello world.')
                }
            }
        }
    });